package com.start.workflow.vo;

import com.alibaba.fastjson2.JSONObject;
import com.start.workflow.common.enums.StartActHandlerStatus;
import io.swagger.v3.oas.annotations.media.Schema;

import lombok.Data;

import java.util.List;

@Data
 @Schema(name="流程节点处理")
public class StartSubmitActTask {
    /**
     * 任务节状态
     */
     @Schema(name="处理状态")
    private Integer handlerStatus;
    /**
     * 流程意见
     */
     @Schema(name="处理意见")
    private String handlerOpinion;
    /**
     * 节点表单数据
     */
     @Schema(name="流程节点表单数据")
    private JSONObject nodeFormData;


     @Schema(name="下一用户任务节点审批人", description = "仅适用于自定义审批人")
    private List<StartCustomActAuthUser> nextTaskAuthUser;


     @Schema(name="流程节点变量")
    private JSONObject nodeVariables;
     @Schema(name="当前审批人")
    private StartCustomActAuthUser authUser;
    /**
     * 流程节点定义key
     */
     @Schema(name="流程节点定义key", description = "默认该值为空 如果有值流程蒋跳转到被审批过的指定节点")
    private String targetTaskDefKey;
     @Schema(name="自定义节点审批人")
    private List<StartCustomActAuthUser> targetTaskAuthUsers;

    public StartActNodeAction userAction() {
        return StartActNodeAction.create(handlerStatus, handlerOpinion);
    }


}
